#include "Student.h"
#include "QuickSort.h"
#include "MergeSort.h"
#include "InsertSort.h"
#include "SelectionSort.h"
#include "SortTestHelper.h"

using namespace std;

int main(){
    int n = 50000;
    int* arr = SortTestHelper::generateRandomArray(n, 0, 10);
//    int* arr = SortTestHelper::generateNearlyOrderedArray(n, 10);
    int* arr2 = SortTestHelper::copyIntArray(arr, n);
    int* arr3 = SortTestHelper::copyIntArray(arr, n);
    int* arr4 = SortTestHelper::copyIntArray(arr, n);
    int* arr5 = SortTestHelper::copyIntArray(arr, n);
//    selectionSort(arr, n);
//    SortTestHelper::printArray(arr, n);

    SortTestHelper::testSort("Selection Sort", selectionSort, arr, n);
    SortTestHelper::testSort("Insert sort", insertSort, arr2, n);
    SortTestHelper::testSort("Merge Sort", mergeSort, arr3, n);
    SortTestHelper::testSort("Quick Sort2", quickSort2, arr4, n);
    SortTestHelper::testSort("Quick Sort3", quickSort3, arr5, n);

    delete[] arr;
    delete[] arr2;
    delete[] arr3;
    delete[] arr4;
    delete[] arr5;

    return 0;
}
